package com.openlogic.common.logic.node.enums;

import java.util.HashMap;
import java.util.Map;

/**
* @ClassName: NodeTypeEnums
* @Description: 节点解析策略枚举管理
* @author weiyongpeng
* @date 2024年7月14日 下午12:10:36
 */
public enum NodeExecEnums {
	
	START_NODE("start","开始节点"),
	DEFAULT_NODE("default","默认节点"),
	DEC_NODE("dec","判断节点"),
	RESULT_NODE("result","计算节点"),
	SWITCH_NODE("switch","分支节点"),
	AREA_NODE("area","循环域节点"),
	SCORECARD_NODE("scoreCard","评分卡节点"),
	CMATR_NODE("cMatr","交叉矩阵节点"),
	MATR_NODE("matr","矩阵节点"),
	MATR_NEW_NODE("matrNew","矩阵节点（新）"),
	COMMON_NODE("comm","通讯块"),
	RULES_NODE("rules","规则块节点");
	
    private static Map<String,NodeExecEnums> execNodeType = new HashMap<>();
    static {
        for (NodeExecEnums value : NodeExecEnums.values()) {
        	execNodeType.put(value.getCode(),value);
        }
    }

	private String code;
	private String desc;
	
	private NodeExecEnums(String code,String desc) {
		this.code = code;
		this.desc = desc;
	}

	private NodeExecEnums() {
	}

	public String getCode() {
		return code;
	}

	public void setCode(String code) {
		this.code = code;
	}

	public String getDesc() {
		return desc;
	}

	public void setDesc(String desc) {
		this.desc = desc;
	}

	public static NodeExecEnums find(String nodeCode) {
		return execNodeType.get(nodeCode);
	}
}

